\(\int \frac {(a+b \csc ^{-1}(c x))^2}{x^2} \, dx\) [20]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [B] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 14, antiderivative size = 50 \[ \int \frac {\left (a+b \csc ^{-1}(c x)\right )^2}{x^2} \, dx=\frac {2 b^2}{x}-2 b c \sqrt {1-\frac {1}{c^2 x^2}} \left (a+b \csc ^{-1}(c x)\right )-\frac {\left (a+b \csc ^{-1}(c x)\right )^2}{x} \]

[Out]

2*b^2/x-(a+b*arccsc(c*x))^2/x-2*b*c*(a+b*arccsc(c*x))*(1-1/c^2/x^2)^(1/2)

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 50, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {5331, 3377, 2717} \[ \int \frac {\left (a+b \csc ^{-1}(c x)\right )^2}{x^2} \, dx=-2 b c \sqrt {1-\frac {1}{c^2 x^2}} \left (a+b \csc ^{-1}(c x)\right )-\frac {\left (a+b \csc ^{-1}(c x)\right )^2}{x}+\frac {2 b^2}{x} \]

[In]

Int[(a + b*ArcCsc[c*x])^2/x^2,x]

[Out]

(2*b^2)/x - 2*b*c*Sqrt[1 - 1/(c^2*x^2)]*(a + b*ArcCsc[c*x]) - (a + b*ArcCsc[c*x])^2/x

Rule 2717

Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 3377

Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[(-(c + d*x)^m)*(Cos[e + f*x]/f), x]
+ Dist[d*(m/f), Int[(c + d*x)^(m - 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 5331

Int[((a_.) + ArcCsc[(c_.)*(x_)]*(b_.))^(n_)*(x_)^(m_.), x_Symbol] :> Dist[-(c^(m + 1))^(-1), Subst[Int[(a + b*
x)^n*Csc[x]^(m + 1)*Cot[x], x], x, ArcCsc[c*x]], x] /; FreeQ[{a, b, c}, x] && IntegerQ[n] && IntegerQ[m] && (G
tQ[n, 0] || LtQ[m, -1])

Rubi steps \begin{align*} \text {integral}& = -\left (c \text {Subst}\left (\int (a+b x)^2 \cos (x) \, dx,x,\csc ^{-1}(c x)\right )\right ) \\ & = -\frac {\left (a+b \csc ^{-1}(c x)\right )^2}{x}+(2 b c) \text {Subst}\left (\int (a+b x) \sin (x) \, dx,x,\csc ^{-1}(c x)\right ) \\ & = -2 b c \sqrt {1-\frac {1}{c^2 x^2}} \left (a+b \csc ^{-1}(c x)\right )-\frac {\left (a+b \csc ^{-1}(c x)\right )^2}{x}+\left (2 b^2 c\right ) \text {Subst}\left (\int \cos (x) \, dx,x,\csc ^{-1}(c x)\right ) \\ & = \frac {2 b^2}{x}-2 b c \sqrt {1-\frac {1}{c^2 x^2}} \left (a+b \csc ^{-1}(c x)\right )-\frac {\left (a+b \csc ^{-1}(c x)\right )^2}{x} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.10 (sec) , antiderivative size = 71, normalized size of antiderivative = 1.42 \[ \int \frac {\left (a+b \csc ^{-1}(c x)\right )^2}{x^2} \, dx=-\frac {a^2-2 b^2+2 a b c \sqrt {1-\frac {1}{c^2 x^2}} x+2 b \left (a+b c \sqrt {1-\frac {1}{c^2 x^2}} x\right ) \csc ^{-1}(c x)+b^2 \csc ^{-1}(c x)^2}{x} \]

[In]

Integrate[(a + b*ArcCsc[c*x])^2/x^2,x]

[Out]

-((a^2 - 2*b^2 + 2*a*b*c*Sqrt[1 - 1/(c^2*x^2)]*x + 2*b*(a + b*c*Sqrt[1 - 1/(c^2*x^2)]*x)*ArcCsc[c*x] + b^2*Arc
Csc[c*x]^2)/x)

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(114\) vs. \(2(48)=96\).

Time = 0.76 (sec) , antiderivative size = 115, normalized size of antiderivative = 2.30

method result size
parts \(-\frac {a^{2}}{x}+b^{2} c \left (-\frac {\operatorname {arccsc}\left (c x \right )^{2}}{c x}+\frac {2}{c x}-2 \,\operatorname {arccsc}\left (c x \right ) \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}\right )+2 a b c \left (-\frac {\operatorname {arccsc}\left (c x \right )}{c x}-\frac {c^{2} x^{2}-1}{\sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}\, c^{2} x^{2}}\right )\) \(115\)
derivativedivides \(c \left (-\frac {a^{2}}{c x}+b^{2} \left (-\frac {\operatorname {arccsc}\left (c x \right )^{2}}{c x}+\frac {2}{c x}-2 \,\operatorname {arccsc}\left (c x \right ) \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}\right )+2 a b \left (-\frac {\operatorname {arccsc}\left (c x \right )}{c x}-\frac {c^{2} x^{2}-1}{\sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}\, c^{2} x^{2}}\right )\right )\) \(118\)
default \(c \left (-\frac {a^{2}}{c x}+b^{2} \left (-\frac {\operatorname {arccsc}\left (c x \right )^{2}}{c x}+\frac {2}{c x}-2 \,\operatorname {arccsc}\left (c x \right ) \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}\right )+2 a b \left (-\frac {\operatorname {arccsc}\left (c x \right )}{c x}-\frac {c^{2} x^{2}-1}{\sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}\, c^{2} x^{2}}\right )\right )\) \(118\)

[In]

int((a+b*arccsc(c*x))^2/x^2,x,method=_RETURNVERBOSE)

[Out]

-a^2/x+b^2*c*(-1/c/x*arccsc(c*x)^2+2/c/x-2*arccsc(c*x)*((c^2*x^2-1)/c^2/x^2)^(1/2))+2*a*b*c*(-1/c/x*arccsc(c*x
)-1/((c^2*x^2-1)/c^2/x^2)^(1/2)/c^2/x^2*(c^2*x^2-1))

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.14 \[ \int \frac {\left (a+b \csc ^{-1}(c x)\right )^2}{x^2} \, dx=-\frac {b^{2} \operatorname {arccsc}\left (c x\right )^{2} + 2 \, a b \operatorname {arccsc}\left (c x\right ) + a^{2} - 2 \, b^{2} + 2 \, \sqrt {c^{2} x^{2} - 1} {\left (b^{2} \operatorname {arccsc}\left (c x\right ) + a b\right )}}{x} \]

[In]

integrate((a+b*arccsc(c*x))^2/x^2,x, algorithm="fricas")

[Out]

-(b^2*arccsc(c*x)^2 + 2*a*b*arccsc(c*x) + a^2 - 2*b^2 + 2*sqrt(c^2*x^2 - 1)*(b^2*arccsc(c*x) + a*b))/x

Sympy [F]

\[ \int \frac {\left (a+b \csc ^{-1}(c x)\right )^2}{x^2} \, dx=\int \frac {\left (a + b \operatorname {acsc}{\left (c x \right )}\right )^{2}}{x^{2}}\, dx \]

[In]

integrate((a+b*acsc(c*x))**2/x**2,x)

[Out]

Integral((a + b*acsc(c*x))**2/x**2, x)

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 79, normalized size of antiderivative = 1.58 \[ \int \frac {\left (a+b \csc ^{-1}(c x)\right )^2}{x^2} \, dx=-2 \, {\left (c \sqrt {-\frac {1}{c^{2} x^{2}} + 1} + \frac {\operatorname {arccsc}\left (c x\right )}{x}\right )} a b - 2 \, {\left (c \sqrt {-\frac {1}{c^{2} x^{2}} + 1} \operatorname {arccsc}\left (c x\right ) - \frac {1}{x}\right )} b^{2} - \frac {b^{2} \operatorname {arccsc}\left (c x\right )^{2}}{x} - \frac {a^{2}}{x} \]

[In]

integrate((a+b*arccsc(c*x))^2/x^2,x, algorithm="maxima")

[Out]

-2*(c*sqrt(-1/(c^2*x^2) + 1) + arccsc(c*x)/x)*a*b - 2*(c*sqrt(-1/(c^2*x^2) + 1)*arccsc(c*x) - 1/x)*b^2 - b^2*a
rccsc(c*x)^2/x - a^2/x

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 104 vs. \(2 (48) = 96\).

Time = 0.30 (sec) , antiderivative size = 104, normalized size of antiderivative = 2.08 \[ \int \frac {\left (a+b \csc ^{-1}(c x)\right )^2}{x^2} \, dx=-{\left (2 \, b^{2} \sqrt {-\frac {1}{c^{2} x^{2}} + 1} \arcsin \left (\frac {1}{c x}\right ) + 2 \, a b \sqrt {-\frac {1}{c^{2} x^{2}} + 1} + \frac {b^{2} \arcsin \left (\frac {1}{c x}\right )^{2}}{c x} + \frac {2 \, a b \arcsin \left (\frac {1}{c x}\right )}{c x} + \frac {a^{2}}{c x} - \frac {2 \, b^{2}}{c x}\right )} c \]

[In]

integrate((a+b*arccsc(c*x))^2/x^2,x, algorithm="giac")

[Out]

-(2*b^2*sqrt(-1/(c^2*x^2) + 1)*arcsin(1/(c*x)) + 2*a*b*sqrt(-1/(c^2*x^2) + 1) + b^2*arcsin(1/(c*x))^2/(c*x) +
2*a*b*arcsin(1/(c*x))/(c*x) + a^2/(c*x) - 2*b^2/(c*x))*c

Mupad [B] (verification not implemented)

Time = 1.01 (sec) , antiderivative size = 88, normalized size of antiderivative = 1.76 \[ \int \frac {\left (a+b \csc ^{-1}(c x)\right )^2}{x^2} \, dx=-\frac {a^2}{x}-\frac {b^2\,\left ({\mathrm {asin}\left (\frac {1}{c\,x}\right )}^2-2\right )}{x}-2\,b^2\,c\,\mathrm {asin}\left (\frac {1}{c\,x}\right )\,\sqrt {1-\frac {1}{c^2\,x^2}}-2\,a\,b\,c\,\left (\sqrt {1-\frac {1}{c^2\,x^2}}+\frac {\mathrm {asin}\left (\frac {1}{c\,x}\right )}{c\,x}\right ) \]

[In]

int((a + b*asin(1/(c*x)))^2/x^2,x)

[Out]

- a^2/x - (b^2*(asin(1/(c*x))^2 - 2))/x - 2*b^2*c*asin(1/(c*x))*(1 - 1/(c^2*x^2))^(1/2) - 2*a*b*c*((1 - 1/(c^2
*x^2))^(1/2) + asin(1/(c*x))/(c*x))